<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        var colors = ["Red", "Green", "White", "Black"];
        // case 1 output: 'Red Green White Black'
        // case 2 output: 'Red+Green+White+Black'
        // case 3 output: 'Red,Green,White,Black'
        var b=[];
        for(var i=1;i<4;i++){
            switch (i){
                case 1:b=colors.join(" ");console.log(b);break;
                case 2:b=colors.join("+");console.log(b);break;
                case 3:b=colors.join(",");console.log(b);break;
            }
        }
    </script>
</head>
<body>

</body>
</html>